﻿{% extends 'base.html' %}     # 继承母版内容


<!-- 填充页面内容 -->
{% block body-content %}
    <div class="container">
        <p></p>
        <table class="table table-bordered form-inline" align="center">
            <caption>研发部产品信息列表</caption>
            <thead>
            <tr>
                <th rowspan="2" style="vertical-align: middle;">序号</th>
                <th rowspan="2" style="vertical-align: middle;">产品名称</th>
                <th rowspan="2" style="vertical-align: middle;">当前版本</th>
                <th rowspan="2" style="vertical-align: middle;">产品状态</th>
                <th colspan="7" style="text-align: center;">升级情况</th>
                <th rowspan="2" style="vertical-align: middle;">产品负责人</th>
                <th rowspan="2" style="vertical-align: middle;">研发项目</th>
            </tr>
            <tr>
                <th>归属年度</th>
                <th>升级类型</th>
                <th>升级开始日期</th>
                <th>升级截止日期</th>
                <th>升级负责人</th>
                <th>升级任务状态</th>
                <th>升级内容</th>
            </tr>
            </thead>
            <tbody>
            {% for d in data_list %}
                <!-- 显示不同背景 -->
                <tr {% if forloop.counter|divisibleby:"2" %} class="active"
                {% else %} class="success"  {% endif %}  >
                    <td>{{ d.id }}</td>
                    <td>{{ d.update_name }}</td>
                    <td>{{ d.update_version }}</td>
                    <td>{{ d.update_status_number }}</td>
                    <td>{{ d.year_plan_number }}</td>
                    <td>{{ d.update_type_number }}</td>
                    <td>{{ d.update_s_date }}</td>
                    <td>{{ d.update_e_date }}</td>
                    <td>{{ d.update_coder_number }}</td>
                    <td>{{ d.task_status_number }}</td>
                    <td><a href="">详情</a> </td>
                    <td>{{ d.update_manager_number }}</td>
                    <td>{{ d.project_info_number }}</td>
                </tr>
            {% endfor %}
            </tbody>

        </table>
        <!-- 页面导航栏 -->
        <p>
            {% if data_list.has_previous %}
                <a href="?page={{ data_list.previous_page_number }}">上一页</a>
            {% endif %}
            {# data.paginator.number_pages 返回总页数 #}
            第{{ data_list.number }}页 | 共{{ data_list.paginator.num_pages }}页
            {% if data_list.has_next %}
                <a href="?page={{ data_list.next_page_number }}">下一页</a>
            {% endif %}
        </p>

    </div>

{% endblock %}
